Field of the Invention
The present invention relates to an image capturing apparatus and a control method for the image capturing apparatus and particularly to a technique suitably used in an object detection device mounted in the image capturing apparatus.
Description of the Related Art
A conventionally known object tracking device in an image capturing apparatus including an image sensor, detects a main object from a certain frame of continuously captured images and tracks the main object in subsequent frames. By detecting a position of the main object in the image, the image capturing apparatus having such an object tracking device can automatically control the orientation of the image capturing apparatus in accordance with the movement of the main object, and can appropriately execute auto focus (AF) adjustment and automatic exposure (AE) calculation for the main object.
However, object tracking is a difficult task, which might lose a tracking target or track an object different from the intended tracking target due to a change in the color and the shape of an object or an influence of noise, for example. Even when the object tracking device can accurately track the tracking target, if a contrast of the tracking target is low, the image capturing apparatus fails to detect a focal point, and the auto focus adjustment ends in failure.
As one approach proposed to solve the failure of AF tracking, an estimation method utilizing probability has been used to estimate a state of a tracking target. The estimation methods include what is known as a “particle filter” in which Bayesian estimation is sequentially performed on time series data.
The particle filter is a method for estimating current time series data from data obtained by performing prediction based on past time series data and observing the current time series data based on a finite number of sample points referred to as particles. A probability distribution on time series data is approximated using a group of the particles each showing a likelihood function based on the predicted data and the observed data. Thus, the particle filter can be applied to both non-linear and non-Gaussian probability distributions.
The estimation method using the particle filter sets a likelihood function in accordance with a time series data model to perform target tracking. For example, image tracking methods using the particle filter are discussed in “CONDENSATION—Conditional Density Propagation for Visual Tracking,” by M. Isard and A. Blake, International Journal of Computer Vision, Vol. 29, No. 1, pp. 5 to 28, 1998; and “Particle Filter”, by Tomoyuki Higuchi, the Journal of the Institute of Electronics, Information and Communication Engineers, Vol. 88, No. 12, pp. 989 to 994, 1 Dec. 2005.
In a known method for solving the failure of AF tracking, a detected position of the main object on the image coordinates is represented not by a single point but by a plurality of coordinates or an area. This method can achieve higher chance of detecting an area suitable for focus detection.
For example, Japanese Patent Application Laid-Open No. 2009-188977 discusses an object tracking technique based on the particle filter. A target tracking apparatus discussed in Japanese Patent Application Laid-Open No. 2009-188977 measures a likelihood obtained through comparison of the color in a tracking target with the color in the proximity of a particle moving in an image under a predetermined rule, to estimate an area including the tracking target.
Further, Japanese Patent Application Laid-Open No. 2012-226206 discusses a technique for detecting a focal point in an area within a main object area, which is suitable for the focus detection by detecting a plurality of main object candidate positions. An image tracking device and an image capturing apparatus discussed in Japanese Patent Application Laid-Open No. 2012-226206 estimate a plurality of main object positions through the tracking processing and the plurality of the main object positions are used as a main object candidate area. Then, the focus detection is performed on each of the main object candidate areas.
If one of the plurality of candidate areas most similar to the main object is suitable for the focus detection, focus adjustment is performed based on a result of the focus detection carried out in the area.
On the other hand, when the candidate area having the highest similarity is unsuitable for the focus detection, an area suitable for the focus detection is selected from the other candidate areas and the focus adjustment is performed with the area.
However, the conventional technique discussed in Japanese Patent Application Laid-Open No. 2009-188977 does not refer to the focus adjustment for the main object and thus cannot be directly applied to an image capturing apparatus that performs the focus adjustment.
When the focus detection cannot be performed in the area most similar to the main object, the conventional technique discussed in Japanese Patent Application Laid-Open No. 2012-226206 described above selects the area on which focus detection is performed, without taking similarities of other candidate areas into consideration. Consequently, even when there is another candidate area having high similarity, the similarity is not taken into consideration in selecting the area on which focus detection is performed.